Virtual-machine technology facilitates increased physical resource utilization as well as agile machine provisioning, among other things. Traditionally, software applications are tightly coupled to physical servers on which they run. Virtual-machine technology provides a layer of abstraction between the software applications as well as physical hardware and enables provisioning of multiple virtual machines on a single physical server (a.k.a., host), for example. As a result, workloads can be consolidated to improve physical asset utilization, and machines can be rapidly deployed and decommissioned, as needed.
A virtual machine (VM) is a piece of software that emulates a physical computer utilizing a virtual hard disk (VHD), among other things. A VHD is a physical hard disk analogue for a virtual machine. Accordingly, the VHD can include like representations for data and structural elements, such as files and folders. An operating system (OS) (a.k.a. guest operating system) can be installed on the VHD. Further, one or more applications can be installed on the VHD, and the OS can support execution of the one or more applications with respect to the virtual machine.
Placing a VM on a host machine involves allocating resources for the VM in light of competition from other VMs. The primary goal of placement is to ensure that VMs are provided with requisite resources to operate. In one implementation, slot allocation is employed, where the average amount of resources a VM consumes is determined, and host capacity is divided to determine a fixed number of slots. Each VM is then placed in a single slot regardless of actual resource usage. Alternatively, a more computationally intense approach can be employed, wherein actual resource requirements are provided for a VM and used for placement. Such requirements include a number of central processing units (CPUs), amount of memory, and connectivity needs (e.g., network I/O, storage I/O). Acquired resource requirements are subsequently employed to allocate required hardware resources automatically.
Furthermore, resource allocation can be optimized for a particular resource concerns including central processing unit (CPU) power, memory, network bandwidth, storage capacity, power, and cooling. For example, host machines can be densely packed with as many VMs as they can support and used machines can be shut down to optimize for power consumption. In another example, VMs can be dispersed thinly across many host machines to minimize the workload of each host and optimize for failure impact. The above scenarios can be termed explicit optimizations, which can be enabled by a virtual-machine-management system, for example. Alternatively, simulations can be run where an administrator identifies potential changes to the system, and the simulation reports the result of the simulation. The administrator can then review the result and determine whether the result is acceptable or if further modifications should be made.